<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * App\OrderCoupon
 *
 * @property int $id
 * @property int|null $order_pay_id 支付订单id
 * @property int|null $coupon_id 优惠券id
 * @property string|null $coupon_object 优惠券快照 防止后台更改数据
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderCoupon whereCouponId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderCoupon whereCouponObject($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderCoupon whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderCoupon whereOrderPayId($value)
 * @mixin \Eloquent
 * @property int|null $user_coupon_id 用户优惠券id
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderCoupon whereUserCouponId($value)
 */
class OrderCoupon extends Model
{
    protected $table='order_pay_coupons';
    public $timestamps=false;
    public function getCouponObjectAttribute($pictures){
        return  json_decode($pictures, true);
    }
}
